home *** CD-ROM | disk | FTP | other *** search
/ X User Tools / X User Tools (O'Reilly and Associates)(1994).ISO / sun4c / archive / tcltk.z / tcltk / man / cat3 / GetAnchor.3 < prev    next >
Text File  |  1994-09-20  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4. Tk_GetAnchor(3)       Tk Library Procedures
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NAME
  11.      Tk_GetAnchor, Tk_NameOfAnchor -  translate  between  strings
  12.      and anchor positions
  13.  
  14. SYNOPSIS
  15.      #include <tk.h>
  16.  
  17.      Tk_Anchor
  18.      Tk_GetAnchor(_i_n_t_e_r_p, _s_t_r_i_n_g, _a_n_c_h_o_r_P_t_r)
  19.  
  20.      char *
  21.      Tk_NameOfAnchor(_a_n_c_h_o_r)
  22.  
  23. ARGUMENTS
  24.      Tcl_Interp  *_i_n_t_e_r_p      (in)      Interpreter  to  use  for
  25.                                         error reporting.
  26.  
  27.      char        *_s_t_r_i_n_g      (in)      String containing name of
  28.                                         anchor   point:   one  of
  29.                                         ``n'',   ``ne'',   ``e'',
  30.                                         ``se'',   ``s'',  ``sw'',
  31.                                         ``w'',     ``nw'',     or
  32.                                         ``center''.
  33.  
  34.      int         *_a_n_c_h_o_r_P_t_r   (out)     Pointer  to  location  in
  35.                                         which   to  store  anchor
  36.                                         position corresponding to
  37.                                         _s_t_r_i_n_g.
  38.  
  39.      Tk_Anchor   _a_n_c_h_o_r       (in)      Anchor   position,   e.g.
  40.                                         TCL_ANCHOR_CENTER.
  41. _________________________________________________________________
  42.  
  43.  
  44. DESCRIPTION
  45.      Tk_GetAnchor  places  in  *_a_n_c_h_o_r_P_t_r  an   anchor   position
  46.      (enumerated  type Tk_Anchor) corresponding to _s_t_r_i_n_g,  which
  47.      will  be  one  of  TK_ANCHOR_N,  TK_ANCHOR_NE,  TK_ANCHOR_E,
  48.      TK_ANCHOR_SE,    TK_ANCHOR_S,   TK_ANCHOR_SW,   TK_ANCHOR_W,
  49.      TK_ANCHOR_NW, or  TK_ANCHOR_CENTER.   Anchor  positions  are
  50.      typically used for indicating a point on an object that will
  51.      be used to position  that  object,  e.g.  TK_ANCHOR_N  means
  52.      position  the top center point of the object at a particular
  53.      place.
  54.  
  55.      Under normal circumstances the return value  is  TCL_OK  and
  56.      _i_n_t_e_r_p  is unused.  If _s_t_r_i_n_g doesn't contain a valid anchor
  57.      position or an abbreviation of one of these names,  then  an
  58.      error  message  is  stored  in  _i_n_t_e_r_p->_r_e_s_u_l_t, TCL_ERROR is
  59.      returned, and *_a_n_c_h_o_r_P_t_r is unmodified.
  60.  
  61.  
  62.  
  63. Tk                                                              1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. Tk_GetAnchor(3)       Tk Library Procedures
  71.  
  72.  
  73.  
  74.      Tk_NameOfAnchor is  the  logical  inverse  of  Tk_GetAnchor.
  75.      Given  an  anchor  position such as TK_ANCHOR_N it returns a
  76.      statically-allocated string  corresponding  to  _a_n_c_h_o_r.   If
  77.      _a_n_c_h_o_r  isn't  a  legal  anchor value, then ``unknown anchor
  78.      position'' is returned.
  79.  
  80.  
  81. KEYWORDS
  82.      anchor position
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Tk                                                              2
  130.  
  131.  
  132.  
  133.